package cn.johnyu;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;

import static java.util.Arrays.asList;

public class SampleData {

    //=============所有的歌手========================

    public static final Artist michalJackson = new Artist("Michal Jackson", "US");
    public static final Artist johnLennon = new Artist("John Lennon", "UK");
    public static final Artist yoko = new Artist("小野洋子", "JP");

    public static final Artist johnColtrane = new Artist("John Coltrane", "US");
    public static final Artist jiangChui = new Artist("崔健", "中国");


    public static final Artist paulMcCartney = new Artist("Paul McCartney", "UK");
    public static final Artist georgeHarrison = new Artist("George Harrison", "UK");
    public static final Artist ringoStarr = new Artist("Ringo Starr", "UK");

    public static final List<Artist> membersOfTheBeatles = Arrays.asList(johnLennon, paulMcCartney, georgeHarrison, ringoStarr);
    public static final Artist theBeatles = new Artist("The Beatles", membersOfTheBeatles, "UK");

    public static final List<Artist> allArtists=Arrays.asList(johnLennon,yoko,michalJackson,johnColtrane,jiangChui,paulMcCartney,georgeHarrison,ringoStarr,theBeatles);


    //============所有的歌曲======================

    //John Coltrane' Song --
    public static final Track acknowledgement =new Track("Acknowledgement", 467);
    public static final Track  resolution=new Track("Resolution", 442);


    //John Lennon's Song
    public static final Track  startingOver=new Track("Starting Over", 370);
    public static final Track  kiss3=new Track("Kiss kiss kiss", 431);

    public static final Track  ohMyLove=new Track("Oh My Love", 165);
    public static final Track  giveMeSomeTruth=new Track("Give Me Some Truth", 387);
    public static final Track  how=new Track("how", 256);

    //Michael Jackson' Songs
    public static final Track  blackOrWhite=new Track("Black Or White", 321);
    public static final Track  seriousEffect=new Track("Serious Effect", 278);
    public static final Track  happyBirthdaylisa=new Track("Happy Birthday lisa", 389);

    //崔健的歌曲
    public static final Track  redCloth=new Track("一块红布", 402);
    public static final Track  finalShot=new Track("最后一枪", 321);

    public static final Track shortTrack=new Track("short track", 30);
    public static final Track shortTrack2=new Track("short track2", 59);
    public static final Track shortTrack3=new Track("short track3", 65);
    public static final Track shortTrack4=new Track("short track4", 78);


    public static  List<Track> allTracks=Arrays.asList(acknowledgement,resolution,
            startingOver,kiss3,
            ohMyLove,how,giveMeSomeTruth,
            blackOrWhite,seriousEffect,happyBirthdaylisa,
            shortTrack,shortTrack2,shortTrack3,shortTrack4);

    //================专辑===================

    //John Lennon's Album
    public static final Album doubleFantasy=new Album("Double Fantasy"
            , asList(startingOver,kiss3)
            , asList(johnLennon,yoko));

    public static final Album imagine=new Album("Imagine"
            , asList(giveMeSomeTruth,how,ohMyLove)
            , asList(johnLennon));

    //Michal Jackson's Album
    public static final Album dangerous=new Album("Dangerous"
            , asList(blackOrWhite,seriousEffect,happyBirthdaylisa)
            , asList(michalJackson));

    //崔健的专辑
    public static final Album resolved=new Album("解决"
            , asList(redCloth,finalShot)
            , asList(jiangChui));

    public static final Album aLoveSupreme = new Album("A Love Supreme"
            , asList(acknowledgement, resolution)
            , asList(johnColtrane));

    public static final Album shortAlbum = new Album("Sample Short Album"
            , asList(shortTrack,shortTrack2)
            , asList(johnColtrane));

    public static final Album manyTrackAlbum = new Album("Many Track Album"
            , asList(shortTrack,  shortTrack2 ,shortTrack3,shortTrack4)
            , asList(johnColtrane));

    public static final Album simpleAlbum = new Album("Simple album"
            , asList(acknowledgement, resolution)
            , asList(johnLennon,johnColtrane,paulMcCartney));


    public static List<Album> allAlbums=Arrays.asList(dangerous,
            aLoveSupreme, doubleFantasy,
            imagine,resolved,shortAlbum
            ,manyTrackAlbum,simpleAlbum);

    public static Stream<Album> albums = Stream.of(aLoveSupreme, shortAlbum,simpleAlbum);
    public static List<Artist> getThreeArtists() {
        return Arrays.asList(johnColtrane, johnLennon, theBeatles);
    }

}
